Revert "fix: pass workspace policyID when exporting with account-level custom templates"#93091
Conversation
…l custom templates"
|
@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90d887adae
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| reportIDList: [moneyRequestReport.reportID], | ||
| transactionIDList, | ||
| policyID: policyID ?? moneyRequestReport.policyID, | ||
| policyID, |
There was a problem hiding this comment.
Pass report policyID for account-level template exports
For account-level in-app templates, getExportTemplates creates entries without template.policyID, so this call now sends policyID: undefined whenever a user exports a workspace report with one of those templates. The backend no longer has the workspace context needed to resolve policy fields/GL codes, so account-level custom template exports from the report menu produce incorrect or missing workspace-specific columns; the selection-toolbar path still passes policy?.id for the same API call.
Useful? React with 👍 / 👎.
| reportIDList: [], | ||
| transactionIDList: [], | ||
| policyID: exportPolicyID, | ||
| policyID, |
There was a problem hiding this comment.
Restore workspace fallback for search template exports
When users choose an account-level custom template from search, template.policyID is undefined. For a single-workspace selection or an “all matching” search filtered to one policy, this branch now queues policyID: undefined instead of deriving the workspace from the selection/query, so workspace-specific fields in the exported template resolve incorrectly even though all exported items belong to one workspace.
Useful? React with 👍 / 👎.
|
It's a straight revert |
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Revert "fix: pass workspace policyID when exporting with account-level custom templates" (cherry picked from commit 5f4c382) (cherry-picked to staging by Julesssss)
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.4.1-6 🚀
Bundle Size Analysis (Sentry): |
Help site review — no changes requiredI reviewed the changes in this PR and no updates to the help site files under Why:
No draft docs PR has been created since there is nothing to document. @madmax330, I determined no help site changes are needed for this revert. If you believe a user-facing behavior change should be documented, let me know and I'll create the draft PR. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.1-6 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.4.2-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required I reviewed this PR and no updates to the help site ( Why: This is a straight revert of Expensify/App#92131, which was an internal logic fix for how a workspace
The help articles describe how to create and use custom export templates and GL codes, not the internal mechanics of which @madmax330, since no help site changes are required, no linked docs PR was created. Let me know if you'd like me to take another look. |
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.4.4-1 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: No documentation changes required. This PR is a straight revert of Expensify/App#92131 (which caused deploy blocker Expensify/App#93088). The changes are purely internal implementation details:
These only affect which No draft help site PR was created because no @madmax330, please confirm you agree no help site changes are needed. If you believe a doc update is warranted, let me know what behavior changed for users and I'll create the draft PR. |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.4-3 🚀
|
Reverts #92131
That PR caused a deploy blocker: #93088
So we're doing a straight revert